package com.okami.sourcecode.jdk;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @author: TanJingyu
 * @create: 2021-01-08 15:28
 **/
public class LocalDateTimeTest {
    public static void main(String[] args) {
        LocalDateTime now = LocalDateTime.now();
        System.out.println(now);
        System.out.println(now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
    }
}
